package cn.vcjf.weapp.api.active.mapper;

import cn.vcjf.weapp.api.active.entity.GoodsActive;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhengzihang
 * @since 2018-09-26
 */
public interface GoodsActiveMapper extends BaseMapper<GoodsActive> {

	@Override
	List<GoodsActive> selectList(@Param("ew") Wrapper<GoodsActive> wrapper);

	/**
	 * 查询热门的活动
	 *
	 * @param wrapper
	 * @return
	 */
	List<GoodsActive> selectHotActive(RowBounds rowBounds,@Param("ew") Wrapper<GoodsActive> wrapper);

	@Override
	List<GoodsActive> selectPage(RowBounds rowBounds, @Param("ew") Wrapper<GoodsActive> wrapper);

	GoodsActive findActiveInfo(GoodsActive goodsActive);

	int updateExpireActive();

}
